import { PartialType } from '@nestjs/mapped-types';
import { CreatePostDto } from './create-post.dto';
import { ApiPropertyOptional } from '@nestjs/swagger';

export class UpdatePostDto extends PartialType(CreatePostDto) {
  @ApiPropertyOptional({ description: '文章标题' })
  title?: string;

  @ApiPropertyOptional({ description: 'slug，唯一标识' })
  slug?: string;

  @ApiPropertyOptional({ description: '内容' })
  content?: string;

  @ApiPropertyOptional({ description: '作者ID' })
  authorId?: string;

  @ApiPropertyOptional({ description: '摘要' })
  excerpt?: string;

  @ApiPropertyOptional({ description: '封面图片' })
  coverImage?: string;

  @ApiPropertyOptional({ description: '是否发布' })
  published?: boolean;

  @ApiPropertyOptional({ description: '标签ID数组', type: [String] })
  tags?: string[];
}
